<template>
  <div>
    <input type="text" v-model.lazy="obj.bookname" /><br>
    <input type="text" v-model.number="obj.author" /><br>
    <input type="text" v-model.trim="obj.chu" /><br>
    <button @click="add">修改</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      obj: {
        bookname: "",
        author: "",
        chu: "",
      },
    };
  },
  methods: {
    add() {
      console.log(123);
    },
  },
};
</script>
